package com.itheima.service.impl;


import com.itheima.dao.BookDao;
import com.itheima.dao.UserDao;
import com.itheima.service.UserService;

public class UserServiceImpl implements UserService {

    private UserDao userDao;
    private int num;
    private String str;
    private BookDao bookDao;

    public UserServiceImpl(UserDao userDao,int num,String str) {
        this.userDao = userDao;
        this.num = num;
        this.str = str;
    }

    public void setBookDao(BookDao bookDao) {
        this.bookDao = bookDao;
    }
    /* public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }*/

  /*  public void setNum(int num) {
        this.num = num;
    }

    public void setStr(String str) {
        this.str = str;
    }*/

    public void save() {
        System.out.println("user service running..." +num+"  "+str);
        userDao.save();
        bookDao.save();
    }
}
